export default {
  captcha(data) {
    return {
      name: '获取验证码',
      url: '/rbac/captcha',
      method: 'get',
      data
    }
  },
  smsCode(data) {
    return {
      name: '发送短信验证码',
      url: '/rbac/sms',
      method: 'post',
      data
    }
  },
  loginBySms(params) {
    return {
      name: '手机号验证码登录',
      url: '/rbac/login/mobile',
      method: 'post',
      params
    }
  },
    loginByPws(params) {
        return {
            name: '账号密码登录',
            url: '/rbac/login',
            method: 'post',
            params
        }
    },
  getCurrentUser() {
    return {
      name: '获取当前用户信息',
      url: '/rbac/current',
      method: 'get'
    }
  },
  switchCurrent(data) {
    return {
      name: '切换租户',
      url: `/rbac/tenant/${data.tenantId}/switch`,
      method: 'put'
    }
  }
}
